package club.hicode.daydayup.rabbitmq.topic;

import club.hicode.daydayup.rabbitmq.MQConst;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Topic的接收者
 *
 * @author Liu Chunfu
 * @date 2018-05-08 上午10:32
 **/
@Component
@Slf4j
public class TopicReceiver {

    @RabbitListener(queues = MQConst.TOPIC_QUEUE)
    public void receiveMsg(String msg) {
        log.error("接收到队列：{} 中的消息：{}", MQConst.TOPIC_QUEUE, msg);
    }
}
